function setpaths
% SETPATHS Sets paths to the project directories.
% Necessary libraries are kept together with the project files to reduce
% hassles with DLL paths.

% Set PATH variable to BayTrac DLLs according to the current platform
dir0 = pwd;
cd('../..');
dir1 = pwd;
cd(dir0);

archstr = computer('arch');
switch archstr
    case 'win32'
        DLL_PATH = fullfile(dir1, 'libs\x86');
    case 'win64'
        DLL_PATH = fullfile(dir1, 'libs\x64');
    otherwise
        error('Only win32 and win64 are supported platforms.');
end%switch
setenv('PATH', [getenv('PATH'), ';', DLL_PATH]);


% Set paths to the M file directories
addpath(fullfile(pwd, 'XML'));
addpath(fullfile(pwd, 'MarkerPositions'));
addpath(fullfile(pwd, 'MarkerPositions', 'functions'));
addpath(fullfile(pwd, 'Lokator'));
addpath(fullfile(pwd, 'External', 'xmltree'));
addpath(fullfile(pwd, 'External', 'mapcolors'));
addpath(fullfile(pwd, 'convertRotationMatrix'));
addpath(fullfile(pwd, 'External', 'stoploop'));